{template "header.html"}
<!--首页导航-->
{template "index-daohang.html"}
<!--首页列表-->
<div class="container d-gao-80 {if $_GET['s'] == huiyuan && $_GET['uid'] > 0} d-yincang {/if}">
</div>
<div class="d-container " style="background-color: {$beijingyanse};height: 150px;">
	<div class="d-row">
		<div class="d-col-md-8-juzhong">
			<div class="d-kuan d-beijing-baise d-yuanjiao-bianhua-10-10 d-gao-50" >
				<img src="/static/default/web/img/geren.svg" width="100%" height="200" 
				style="object-fit: cover; max-width: 100%;" class="d-yuanjiao-bianhua-10-10"/>
			</div>
			<div class="d-clear"></div>
		</div>
	</div>
</div>
<div class="d-clear"></div>
<div class="d-container ">
	<div class="d-row d-shang-15">
		<div class="d-col-md-8-juzhong ">
			<div class="d-kuan d-beijing-baise d-yuanjiao-bianhua-10-10  d-buhuanhang " >
				<div class="d-kuan-100 d-zuo-10 d-wenzi-juzhong d-shang-15">
					<img src="{dr_avatar($uid)}" width="80" height="80"
					style="" class="d-yuanjiao-50"/>
					
				</div>
				<div class="d-kuan d-shang-40">
					<div class="col-xs-3 d-wenzi-juzhong">
						<div class="d-wenzi-16 d-jiacu">
							{count action=table table=1_quan uid=$uid zt=1 return=quanzi}
							{$quanzi_count}
						</div>
						<div class="d-zitiyanse-hui">圈子</div>
					</div>
					<div class="col-xs-3 d-wenzi-juzhong d-quxian-0">
						<a {if $member.id == $uid} href="/index.php?s=member&app=quan&c=woquan&m=guanzhu"{/if}>
							<div class="d-wenzi-16 d-jiacu">
								
								{count action=table table=member_friend uid=$uid} 
							</div>
							<div class="d-zitiyanse-hui">关注</div>
						</a>
					</div>
					<div class="col-xs-3 d-wenzi-juzhong d-quxian-0">
						<a {if $member.id == $uid} href="/index.php?s=member&app=quan&c=woquan&m=fensi" {/if}>
							<div class="d-wenzi-16 d-jiacu">
								{count action=table table=member_friend touid=$uid}
							</div>
							<div class="d-zitiyanse-hui">粉丝</div>
						</a>
					</div>
					<div class="col-xs-3 d-wenzi-juzhong">
						<div class="d-wenzi-16 d-jiacu">
							{count action=table table=1_quan_form_son uid=$uid return=quantie}
							{$quantie_count}
						</div>
						<div class="d-zitiyanse-hui">动态</div>
					</div>
				</div>
				<div class="d-clear"></div>
			</div>
			<div class="d-clear"></div>
		</div>
	</div>
</div>
<div class="d-clear"></div>
<div class="d-container ">
	<div class="d-row ">
		<div class="d-col-md-8-juzhong ">
			<div class="d-kuan d-beijing-baise d-buhuanhang " >
				<div class="d-zuo-20 d-kuan d-shang-15">
					<div class="d-wenzi-18 d-jiacu">
						{php $userweixin=\Phpcmf\Service::M()->db->table('member_oauth')->where('uid', $uid)->get()->getRowArray();}
						{php $user=dr_member_info($uid);}
							{if $userweixin.nickname}
								{$userweixin.nickname}
							{elseif $user.name}
								{$user.name}
							{else}
								{$user.username}
							{/if}
					</div>
				</div>
				<div class="d-kuan-160 d-shang-15 d-xia-20 d-you-10 d-quxian-0">
					<div class="d-zitiyanse-hui d-zuo-10 d-div-you d-buhuanhang">
					    <a  id="guanzhu_list_{$uid}" data-id="{$uid}" class="guanzhu_list">
						    {dr_guanzhu_list($uid, $member.id)} 
						</a>
					</div>
				</div>
				<script type="text/javascript">
				//关注
					$(".guanzhu_list").click(function(){
						var id = $(this).data("id");
						$.get("{dr_url_prefix('index.php')}?s=huiyuan&c=show&m=friend&uid="+id, function(data){
							dr_cmf_tips(data.code, data.msg);
							if (data.data.status==1) {
								//window.location.reload();
								$('#module_guanzhu_list_'+id).html(data.data);
								$('#guanzhu_list_'+id).html('<div class=" d-beijing-hui d-yuanjiao-20 d-neikuang-5-10 d-div-you d-wenzi-12"><i class="fa fa-check-circle-o"></i> 已关注</div>');
								
							}else{
								//window.location.reload();
								$('#module_guanzhu_list_'+id).html(data.data);
								$('#guanzhu_list_'+id).html('<div class=" d-beijing-hui d-yuanjiao-20 d-neikuang-5-10 d-div-you d-wenzi-12">关 注</div>');
								
							}
						}, 'json');
					});
				</script>
				
				<div class="d-clear"></div>
			</div>
			<div class="d-clear"></div>
			<!--导航-->
			<div class="d-kuan d-beijing-baise d-bianhua-20 d-beijing-baise d-yuanjiao-bianhua-10-10-xia">
				<div class="row d-buhuanhang d-xia-20">
					<div class="d-neikuang-5-10 d-wenzi-16 {if $_GET['m'] == index }d-a-hei d-jiacu {else} d-a-hui {/if}">
						<a href="{dr_url('huiyuan/show/index',['uid' => $uid])}">全部</a>
					</div>
					<div class="d-neikuang-5-10 d-wenzi-16  {if $_GET['m'] == quan } d-jiacu d-a-hei {else} d-a-hui{/if}">
						<a href="{dr_url('huiyuan/show/quan',['uid' => $uid])}">圈子</a>
					</div>
					
					<!--div class="d-neikuang-5-10 d-wenzi-16 d-zitiyanse-hui">
						问答
					</div-->
				</div>
				<div class="d-xian"></div>
				<!--置顶-->
				<div class="row d-shang-20">
					{php $i=1;}
					{mform module=quan form=son order=inputtime cid=$id uid=$myuid zhiding=1 num=4 return=tt}
						<div class="d-neikuang-5-10 d-wenzi-16  d-chaochu">
							<span class="d-wenzi-12 d-biaoqian-30 d-yuanjiao-5">置顶</span>
							<span class="d-quxian-0 d-zuo-10 ">
								<a href="/index.php?s=quan&c=son&id={$tt.id}">
								{if $tt.title}
								{$tt.title} 
								{else} 
								{dr_strcut(dr_clearhtml($tt.neirong), 30)}
								{/if}
								</a>
							</span>
						</div>
						{php $i++;}
					{/mform}
				</div>
				
				<!--帖子-->
				
			</div>
			<div id="content_list">
			    {template "show-list-index.html"}
			</div>
		</div>
	</div>
</div>
<!--div class="page-content">

    <div class="container" style="">

        <div class="row" style="background-color: #fff;padding: 20px 0">
            <div class="col-md-2" style="text-align: center">
                <img style="border-radius: 50%!important;" src="{dr_avatar($uid)}">
            </div>
            <div class="col-md-10">
                <h5 style="    margin: 0;">{$user.name}</h5>
                <div style="margin-top: 15px;">
                    {if $rt = dr_hy_is_friend($user.id, $member.id)}
                    <a href="javascript:dr_hy_addfriend('{$user.id}');" class="btn btn-circle2 red btn-outline" id="hy_addfriend_{$user.id}"> {if $rt==1}已关注{else}相互关注{/if} </a>
                    {else}
                    <a href="javascript:dr_hy_addfriend('{$user.id}');" class="btn btn-circle2 red" id="hy_addfriend_{$user.id}"> 关注TA </a>
                    {/if}
                    <script type="text/javascript">
                        function dr_hy_addfriend(uid) {
                            $.get("/index.php?is_ajax=1&s=huiyuan&c=show&m=friend&uid="+uid, function(json){
                                dr_cmf_tips(json.code, json.msg);
                                if (json.code) {
                                    if (json.data.status) {
                                        $('#hy_addfriend_'+uid).html(json.data.value);
                                        $('#hy_addfriend_'+uid).addClass("btn-outline");
                                    } else {
                                        $('#hy_addfriend_'+uid).html("关注Ta");
                                        $('#hy_addfriend_'+uid).removeClass("btn-outline");
                                    }
                                }
                            }, 'json');
                        }
                    </script>
                </div>
                <div style="margin-top: 15px;">
                    注册时间：{dr_date($user.regtime)} &nbsp;&nbsp;&nbsp;
                    邮箱： {$user.email} &nbsp;&nbsp;&nbsp;
                    手机：{$user.phone}&nbsp;&nbsp;&nbsp;
                </div>

            </div>
        </div>


    </div>

    <div class="container margin-top-30">


        <div class="row">

            <div class="portlet light bordered">
                <div class="portlet-title tabbable-line">
                    <ul class="nav nav-tabs" style="float: left">
                        <li class="active">
                            <a href="#p1" onclick="dr_one_page()" data-toggle="tab"> Ta的文章 </a>
                        </li>
                        <li>
                            <a href="#p2" onclick="dr_one_page()" data-toggle="tab"> Ta的粉丝 </a>
                        </li>
                        <li>
                            <a href="#p3" onclick="dr_one_page()" data-toggle="tab"> Ta的关注 </a>
                        </li>
                    </ul>
                </div>
                <div class="portlet-body">
                    <div class="tab-content">
                        <div class="tab-pane active search-page search-content-1" id="p1">

                            <div class="search-container">
                                <ul class="search-container" id="list_news">
                                    {template "data_news.html"}
                                </ul>

                                <div class="clearfix margin-bottom-20 margin-top-20">
                                    <a href="javascript:dr_ajax_load_more('news');" class="btn blue btn-block"> 刷新下页 </a>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane search-page search-content-1" id="p2">
                            <div class="search-container">
                                <ul class="search-container" id="list_fensi">
                                    {template "data_fensi.html"}
                                </ul>
                            </div>
                            <div class="clearfix margin-bottom-20 margin-top-20">
                                <a href="javascript:dr_ajax_load_more('fensi');" class="btn blue btn-block"> 刷新下页 </a>
                            </div>
                        </div>
                        <div class="tab-pane search-page search-content-1" id="p3">
                            <div class="search-container">
                                <ul class="search-container" id="list_guanzhu">
                                    {template "data_guanzhu.html"}
                                </ul>
                            </div>
                            <div class="clearfix margin-bottom-20 margin-top-20">
                                <a href="javascript:dr_ajax_load_more('guanzhu');" class="btn blue btn-block"> 刷新下页 </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>







    </div>

</div-->
<script>
    /*var Mpage=1;

    function dr_one_page() {
        Mpage = 1;
    }
    function dr_ajax_load_more(tid) {
        Mpage++;
        var url = '{SITE_URL}index.php?s=api&c=api&m=template&app=huiyuan&myuid={$myuid}&name=data_'+tid+'.html&format=json&page='+Mpage+'&'+Math.random();
        $.get(url,function(res){
            $('.footer-cont').hide();
            if(res.code==1){
                if (res.msg.indexOf("</li>") != -1) {
                    $('#list_'+tid).append(res.msg);
                    scroll_get = true;
                } else {
                    layer.msg("已经显示完了",{time:500});
                }
            }else{
                layer.msg(res.msg,{time:2500});
            }
        }, 'json');
    }*/
	var Mpage=1;
	
	//滚动显示更多
	var scroll_get = true;  //做个标志,不要反反复复的加载
	$(document).ready(function () {
	    $(window).scroll(function () {
	        if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {
	            scroll_get = false;
	            /*layer.msg('内容加截中,请稍候',{time:1000});*/
	            dr_ajax_load_more();
	        }
	    });
	});
	
	function dr_ajax_load_more(){
	    Mpage++;
	    $.get('{SITE_URL}index.php?s=api&c=api&m=template&app=huiyuan&myuid={$myuid}&name=show-list-{$_GET['m']}.html&format=json&page='+Mpage+'&'+Math.random(),function(res){
	        //$('.footer-cont').hide();
	        if(res.code==1){
	            if (res.msg.indexOf("</div>") != -1) {
	                $('#content_list').append(res.msg);
	                scroll_get = true;
	            } else {
	                layer.msg("已经显示完了",{time:500});
	            }
	        }else{
	            /*layer.msg(res.msg,{time:2500});*/
	        }
	    }, 'json');
	}

</script>
{template "footer.html"}